package com.nine.aop.properties;

import com.nine.aop.factory.YmlPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 处理数据绑定额外的 yml 配置，并且使用 @Value 读取
 */
@Data
@Component
@ConfigurationProperties(prefix = "test")
@PropertySource(value = "classpath:custom.yml", encoding = "UTF-8", factory = YmlPropertySourceFactory.class)
public class TestYmlProperties {

    private String name;

}
